﻿using MyFloridaHouse.libSvDTO;
using System.Data;

namespace MyFloridaHouse.DataAccess.Extensions
{
	/// <summary>
	/// DistrictPlanTypeDTODataContract
	/// </summary>
    public static class DistrictPlanTypeDTODataContract
    {
		/// <summary>
		/// Datas the contract.
		/// </summary>
		/// <param name="rdr">The RDR.</param>
		/// <returns>Object: <see cref="DistrictPlanTypeDTO"/></returns>
        public static DistrictPlanTypeDTO DataContract(IDataReader rdr)
        {
            var newItem = new DistrictPlanTypeDTO
                          	{
                          		districtCategory = rdr["DistrictCategory"].ToString(),
                          		displayName = rdr["DisplayName"].ToString(),
                          		description = rdr["Description"].ToString(),
                          		districtCount = (int) rdr["DistrictCount"],
                          		districtPlanTypeID = rdr["DistrictPlanTypeID"].ToString()
                          	};
			return (newItem);
        }
    }
}
